import Vue from 'vue'
import Router from 'vue-router'
import poetryRouter from './modules/poetryRouter'
import scenceRouter from './modules/scenceRouter'
Vue.use(Router)

const originalPush = Router.prototype.push
Router.prototype.push = function push(location) {
	return originalPush.call(this, location).catch(err => err)
}
export default new Router({
	routes: [
		{
			path: '/',
			name: 'home',
			component: () => import('@/views/home'),
			meta: {
				title: '首页'
			}
		},
		{
			path: '/login',
			name: 'login',
			component:() => import('@/views/login/index'),
			meta: {
				title: '登录'
			}
		},
		{
			path: '/roles',
			name: 'roles',
			component:() => import('@/views/login/roles.vue'),
			meta: {
				title: '选择角色'
			}
		},
		{
			path: '/signup',
			name: 'signup',
			component:() => import('@/views/signup/index.vue'),
			meta: {
				title: '报名页'
			}
		},
		{
			path: '/preliminary',
			name: 'preliminary',
			component:() => import('@/views/preliminary/index.vue'),		//初赛首页
			meta: {
				title: '诗王争霸赛'
			}
		},
		{
			path: '/preliminary/rule',
			name: 'preliminaryRule',
			component:() => import('@/views/preliminary/rule.vue'),		//初赛规则
			meta: {
				title: '诗王争霸赛'
			}
		},
		
		{
			path: '/game',
			name: 'game',
			component:() => import('@/views/game/index'),
			meta: {
				title: '飞花令'
			}
		},
		{
			path: '/gameMatch',
			name: 'gameMatch',
			component:() => import('@/views/game/matching'),
			meta: {
				title: '飞花令'
			}
        },
		{
			path: '/gameAnswer',
			name: 'gameAnswer',
			component:() => import('@/views/game/answer'),
			meta: {
				title: '飞花令'
			}
        },
		{
			path: '/gameStatistics',					//统计   --老师
			name: 'gameStatistics',
			component:() => import('@/views/game/statistics'),
			meta: {
				title: '飞花令'
			}
        },
		{
			path: '/semifinal',					//复赛
			name: 'semifinal',
			component:() => import('@/views/semifinal/index'),
			meta: {
				title: '诗王争霸赛'
			}
        },
		//大屏
		//学生排行榜（1920*1280)
		{
			path: '/rankstu',
			name: 'rankstu',
			component:() => import('@/views/bigscreen/rankstu'),
			meta: {
				title: '学生排行榜'
			}
		},
		//学生排行榜（1334*1334)
		{
			path: '/vrankstu',
			name: 'rankstu',
			component:() => import('@/views/bigscreen/vrankstu'),
			meta: {
				title: '学生排行榜'
			}
		},
		//班级排行榜（1920*1280)
		{
			path: '/rankclass',
			name: 'rankclass',
			component:() => import('@/views/bigscreen/rankclass'),
			meta: {
				title: '班级排行榜'
			}
		},
		//班级排行榜（1334*1334)
		{
			path: '/vrankclass',
			name: 'vrankclass',
			component:() => import('@/views/bigscreen/vrankclass'),
			meta: {
				title: '班级排行榜'
			}
		},
		//精彩瞬间
		{
			path: '/wonder',
			name: 'wonder',
			component:() => import('@/views/bigscreen/wonder'),
			meta: {
				title: '精彩瞬间'
			}
		},
		//大屏幕新闻页（1920*1280)
		{
			path: '/news',
			name: 'news',
			component:() => import('@/views/bigscreen/news'),
			meta: {
				title: '大屏幕新闻页'
			}
		},
		//大屏幕新闻页（1920*1920)
		{
			path: '/vnews',
			name: 'vnews',
			component:() => import('@/views/bigscreen/vnews'),
			meta: {
				title: '大屏幕新闻页'
			}
		},
		//智力大比拼
		{
			path: '/pkgame',
			name: 'game',
			component:() => import('@/views/pk/game.vue'),
			meta: {
				title: '诗词知识竞答'
			}
		},
		{
			path: '/pkawait',
			name: 'await',
			component:() => import('@/views/pk/await.vue'),
			meta: {
				title: '诗词知识竞答'
			}
		},
		{
			path: '/pkanswer',
			name: 'answer',
			component:() => import('@/views/pk/answer.vue'),
			meta: {
				title: '诗词知识竞答'
			}
		},
		{
		path: '/poerybg',
		name: 'poerybg',
		component:() => import('@/views/pk/poerybg.vue'),
		meta: {
			title: '诗王争霸赛'
		}
		},
		{
		path: '/poebgdetail',
		name: 'poebgdetail',
		component:() => import('@/views/pk/poebgdetail.vue'),
		meta: {
			title: '诗王争霸赛'
		}
		},
		...poetryRouter,
		...scenceRouter


	]
})
